package com.hsh.erp.enums;

import com.hsh.erp.constants.DateTimeConstants;
import com.hsh.erp.constants.filepath.ExportConstants;
import com.hsh.erp.constants.filepath.ExpressPathConstants;
import com.hsh.erp.constants.filepath.ShopPathConstants;
import com.hsh.erp.domain.file.*;

/**
 * 文件读取和写入的枚举类
 */
public enum FileEnum {

    // 京东导出
    JD_EXPORT(ShopPathConstants.JD_EXPORT_PATH_PRE
            , ShopPathConstants.JD_EXPORT_NAME_PRE
            , DateTimeConstants.NORM_DATE_PATH_PATTERN
            , JDExport.class, ""),


    // 美团导出
    MT_EXPORT(ShopPathConstants.MT_EXPORT_PATH_PRE
            , ShopPathConstants.MT_EXPORT_NAME_PRE
            , DateTimeConstants.NORM_DATE_PATH_PATTERN
            , MTExport.class, ""),

    // 韵达国际导出
    YDGJ_EXPRESS_EXPORT(ExpressPathConstants.YDGJ_EXPORT_NAME_PRE
            , DateTimeConstants.PURE_DATE_PATTERN
            , YDExport.class, ""),


    // 商品管理导出
    PRODUCT_EXPORT(ExportConstants.PRODUCT_PATH_PRE
            , ExportConstants.PRODUCT_NAME_PRE
            , DateTimeConstants.PURE_DATETIME_MS_PATTERN
            , ProductExport.class, "");

    /**
     * 路径前缀
     */
    private final String pathPre;

    /**
     * 文件名前缀
     */
    private final String namePre;

    /**
     * 时间格式
     */
    private final String datePatten;

    /**
     * 每行对应的实体类
     */
    private final Class clazz;

    /**
     * 返回的消息模板
     */
    private final String resultMsg;


    public String getPathPre() {
        return pathPre;
    }

    public String getNamePre() {
        return namePre;
    }

    public String getDatePatten() {
        return datePatten;
    }

    public Class getClazz() {
        return clazz;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    FileEnum(String namePre, String datePatten, Class clazz, String resultMsg) {
        this.pathPre = "";
        this.namePre = namePre;
        this.datePatten = datePatten;
        this.clazz = clazz;
        this.resultMsg = resultMsg;
    }

    FileEnum(String pathPre, String namePre, String datePatten, Class clazz, String resultMsg) {
        this.pathPre = pathPre;
        this.namePre = namePre;
        this.datePatten = datePatten;
        this.clazz = clazz;
        this.resultMsg = resultMsg;
    }

}
